# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-cachecontrol
_pkgname=CacheControl
pkgver=0.12.6
pkgrel=6
pkgdesc='httplib2 caching for requests.'
url='https://pypi.org/project/CacheControl/#files'
arch=('any')
license=('MIT')
depends=('python2' 'python2-requests' 'python2-msgpack')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('5269624dd523c4f94b258ba4d35d2fce65779377c601c1ade01b1058a6616319725fde10b188fbc7015ac263537fb11085272fbbb9b595e87c187521066a567a')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/bin/doesitcache" "$pkgdir/usr/bin/doesitcache2"
}

